﻿using GlobalObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace WCFServiceWebRole1.DataObjects
{
    //public class SensorDataContracts
    //{

       
    //}

    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class SensorResponse
    {
        [DataMember(Name = "Deviceid"), Newtonsoft.Json.JsonProperty]
        public Uri Resource { get; set; }
        [DataMember(Name = "Sensorid"), Newtonsoft.Json.JsonProperty]
        public Sensor SensorDetails { get; set; }
    }
    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class NearestSensorsResponse
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Name { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Location { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Description { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Make { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Longlat { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Double Distance { get; set; }
        
    }
    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class TriggerRequest
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Name { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Double UpperLimit { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Double LowerLimit { get; set; }
    }

    [DataContract]
    [Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class TriggerResponse
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int sensorId { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Name { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Double UpperLimit { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Double LowerLimit { get; set; }
    }

}

